package com.tools.generator.service;

import com.tools.generator.entity.TableEntity;

import java.util.List;

/**
 * @author ShangJY
 */
public interface TableService {

    List<TableEntity> page(TableEntity query);

    TableEntity getByTableName(String tableName);

    List<TableEntity> selectTableByIds(List<Long> ids);

    void deleteBatchIds(Long[] ids);

    /**
     * 导入表
     *
     * @param datasourceId 数据源ID
     * @param tableName    表名
     */
    void tableImport(Long datasourceId, String tableName);

    /**
     * 同步数据库表
     *
     * @param id 表ID
     */
    void sync(Long id);

    void updateById(TableEntity table);

    TableEntity getById(Long id);

    void save(TableEntity table);
}
